import { useState } from "react";
import Input from "../../components/form/Input";
import List from "../../components/form/List";
import '../../css/from.css'
const From = () => {
    const [lists, formList] = useState([
        {
            rqi: '2023-02-09',
            ti: '阿道夫',
            you: '1'
        },
        {
            rqi: '2023-02-09',
            ti: '而威尔',
            you: '2'
        }
    ])
    const updateTodoList = (item) => {
        let nTodoList = [...lists]
        nTodoList.push(item)
        formList(nTodoList)
      }
    return (
        <div className="box">
            <Input updateTodoList={updateTodoList} />
            <List inneList={lists} />
        </div>
    )
}
export default From